home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Graphics / Viewers / ACRViewer.1.3 / developer / api / examples / ACRViewer.h next >
Encoding:
Text File  |  1995-05-12  |  2.7 KB  |  85 lines

  1. //    Application Programming Interface (API) for ACRViewer
  2. //    
  3. //    Jens Breitenborn, 95/05/02
  4. //
  5.  
  6. // The ACRViewer class implements a distributed objects interface
  7. // to the ACRViewer application.
  8.  
  9. // Method description:
  10. // -------------------
  11. //
  12. // - init
  13. //        Launches ACRViewer and establishes the distributed objects connection.
  14. //        It's necessary that ACRViewer is located in a place known by
  15. //        WorkspaceManager. (/LocalApps , ~/Apps)
  16. //
  17. // - (BOOL) openACRFile:(const char*) filename
  18. //        Opens the ACR/NEMA file given by file name in ACRViewer
  19. //
  20. // - (BOOL) openACRDirectory:(const char*) path
  21. //        Opens path as Directory in ACRViewer. Path is scanned for
  22. //        ACR/NEMA files.
  23. //
  24. // - (BOOL) setParameters:(const char*) parameters 
  25. //          forOperator:(const char*) operatorName;
  26. //      A parameter list (example: "Low=10;High= 250") is passed to the
  27. //      Image Operator with name operatorName. 
  28. //      For each "Parameter" in this list, -setParameter:toValue: of the
  29. //      corresponding operator will be invoked. (see ImageOperator.h)
  30. //
  31. // - (BOOL) useOperator:(const char*) operatorName;
  32. //      Activates the corresponding operator (either modifying or
  33. //      non-modifying). If operatorName equals "" (empty string)
  34. //      the currently active modifying operator will be deactivated.
  35. //
  36. // - (BOOL) convertACRFile:(const char*) inFilename 
  37. //             toTiff:(const char*) outFilename;
  38. //      The ACR/NEMA file specified by inFilename is opened in ACRViewer.
  39. //      ACRViewer will convert this file into a TIFF file (outFilename).
  40. //
  41. //    - (BOOL) convertACRFile:(const char*) infilename 
  42. //           toTiff:(const char*) outfilename
  43. //           usingOperator:(const char*) operatorName
  44. //           withParameters:(const char*) parameters;
  45. //        Like simple conversion. But the image operator given by 
  46. //      operatorName is applied to the image. Parameters for the image
  47. //      operator are stored in parameters. (see setParameters:forOperator:)
  48.     
  49.  
  50. // Notes:
  51. //
  52. // If a file name is not absolute, it will be considered relative to
  53. // the executing processes working directory.
  54. //
  55. // A BOOL return value signals successful operation (YES) or failure (NO)
  56. //
  57.  
  58.  
  59. #import <appkit/appkit.h>
  60.  
  61. @interface ACRViewer:Object
  62. {
  63.     id        acrviewer;
  64. }
  65. - init;
  66.  
  67. - (BOOL) openACRFile:(const char*) filename;
  68.  
  69. - (BOOL) openACRDirectory:(const char*) path;
  70.  
  71. - (BOOL) setParameters:(const char*) parameters 
  72.          forOperator:(const char*) operatorName;
  73.  
  74. - (BOOL) useOperator:(const char*) operatorName;
  75.  
  76. - (BOOL) convertACRFile:(const char*) inFilename 
  77.          toTiff:(const char*) outFilename;
  78.          
  79. - (BOOL) convertACRFile:(const char*) infilename 
  80.          toTiff:(const char*) outfilename
  81.          usingOperator:(const char*) operatorName
  82.          withParameters:(const char*) parameters;
  83.          
  84. @end
  85.